<template>
  <!--招采管理-物资招采列表-会签详情弹窗和表单-->
    <j-modal
      title="详情"
      :width="width"
      :visible="visible"
      switchFullscreen
      @ok="handleOk"
      @cancel="handleCancel"
      cancelText="关闭"
      :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
      okText=""

    >
    <a-spin :spinning="confirmLoading">
        <j-form-container >
    <a-form-model ref="form" :label-col="labelCol" :wrapper-col="wrapperCol" :model="model" :rules="validatorRules">
      <!-- 主表单区域 -->
      <a-row class="form-row" :gutter="16">

        <a-col :lg="8">
            <a-form-model-item label="招标名称" prop="name">
              <a-input  v-model="model.biddingName" placeholder="请输入招标名称" />
            </a-form-model-item>
          </a-col>


          <a-col :lg="8">
            <a-form-model-item label="中标候选人" prop="supplierId">
              <a-select  v-model="model.supplierName" placeholder="请选择中标候选人" ></a-select>
              <!-- <j-multi-select-tag :options="supplierList" mode="multiple" v-model="model.supplierId" placeholder="请输入型号" style="overflow: hidden;">
              </j-multi-select-tag> -->
            </a-form-model-item>
          </a-col>
        <a-col :span="8" style="margin-right: -250px">
          <a-form-model-item label="会签文件(上传文件)" prop="fileList">
            <j-upload v-model="model.technicalRequirements"></j-upload>
          </a-form-model-item>
        </a-col>
      </a-row>

    </a-form-model>
</j-form-container>
    </a-spin>
    </j-modal>
  </template>

  <script>
  import { httpAction, getAction } from '@/api/manage'
//   import { mixinDevice } from '@/utils/mixin'
// import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getFileAccessHttpUrl } from '@/api/manage'
import { axios } from '@/utils/request'
import signMd5Utils from '@/utils/encryption/signMd5Utils'
  export default {
    // mixins: [JeecgListMixin, mixinDevice],

    components: {
    },
    props:{
      traneIncTime:{
        type:String
      },
      issueTime:{
        type:String
      },
      id:{
        type:String
      },
      countersignUrl:{
        type:String
      }
    },
    data() {
      return {
        publicBiddingId:'',
        title: '会签信息',
        width: 1100,
        visible: false,
        traneIncTime:'',
        issueTime:'',
        disableSubmit: false,
        confirmLoading: false,
        loading: false,
        treeData: [],
        model: {
            biddingName: '',
            supplierName: '',
        traneIncTime: '',
        technicalRequirements: [],

      },
        countersignUrl:[],

        supplierId:'',
        supplierList:[],
        treeData:[],

      queryParam: { type: '1',publicBiddingId:this.id },
      url: {
        add: '',
        edit: '/bidding/wtPublicBidding/edit',
        orderCustomerList: '/test/jeecgOrderMain/queryOrderCustomerListByMainId',
        orderTicketList: '/test/jeecgOrderMain/queryOrderTicketListByMainId',
        list: '/bidding/wtPublicBiddingMaterials/queryList',
      },
      }
    },
    created() {

  },
    computed:{

    },

    methods: {
      add() {
        this.visible = true

      },

      edit(record) {
      let url = '/bidding/wtBiddingSupplier/getWtBiddingSupplierList'
      let parameter = {
        publicBiddingId: record.id,
        status:'3'
      }

      let sign = signMd5Utils.getSign(url, parameter)

      let signHeader = { 'X-Sign': sign, 'X-TIMESTAMP': signMd5Utils.getTimestamp() }

      axios({
        url: url,
        method: 'get',
        params: parameter,
        headers: signHeader,
      }).then((res) => {
        this.model = res.result[0]

      })
      this.model = Object.assign(
        {
          biddingMaterialsList: [{}],
        },
        record
      )

      this.visible = true
    },
      close() {
        this.$emit('close')
        this.visible = false
      },
      handleCancel() {
        this.close()
      },

    },
  }
  </script>
  <style scoped>
  .div1 {
    width: 100%;
    text-align: center;
    font-size: 16px;
  }
  </style>